package top.csmcool.musicapi.util;

/*
 * @description
 * @date 2025/1/27
 * @author shijin
 * @version 1.0
 */

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


@Component
public class ConfigUtil {

    public static String getConfigPath() {
        String projectPath = System.getProperty("user.dir");
        String path;
        if(System.getProperty("os.name").toLowerCase().contains("windows")
        || System.getProperty("os.name").toLowerCase().contains("mac")) {
            path = projectPath + "/conf/application.properties";
        } else {
            path = "/app/data/application.properties";
        }
        return path;
    }
}
